package com.jinshan.user.controller;


import com.jinshan.response.RetVal;
import com.jinshan.user.service.MemberCenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 会员表 前端控制器
 * </p>
 *
 * @author Jinshan
 * @since 2020-06-30
 */
@RestController
@RequestMapping("/member/center")
@CrossOrigin
public class MemberCenterController {
    @Autowired
    private MemberCenterService memberCenterService;

    @GetMapping("getRegisteredNum/{date}")
    public RetVal getRegisteredNum(@PathVariable("date") String date) {
        Integer registeredNum = memberCenterService.getRegisteredNum(date);
        return RetVal.success().data("registeredNum", registeredNum);
    }
}

